package cn.shadow.game.chess.CHnchess.chessman;


import cn.shadow.game.chess.CHnchess.board.Board;
import cn.shadow.game.chess.CHnchess.type.Camp;
import cn.shadow.game.chess.CHnchess.type.ChessType;

public class ChessFactory {

    public static Chess createChess(Board board, Camp camp, ChessType type) {
        switch (type) {
            case SHUAI:
                return new Commander(board, camp);
            case SHI:
                return new Shi(board, camp);
            case XIANG:
                return new Xiang(board, camp);
            case MA:
                return new Ma(board, camp);
            case CHE:
                return new Che(board, camp);
            case PAO:
                return new Pao(board, camp);
            case BING:
                return new Bing(board, camp);
        }
        return null;
    }
}
